package cn.zhizihua.mapper;

import cn.zhizihua.pojo.OrderDetail;

import java.util.List;

/**
 * 订单明细
 *    添加
 *    删除
 *    通过订单编号查询
 */
public interface OrderDetailMapper{

    //添加订单时需要同时添加订单明细   添加订单明细是批量添加
    int addBatch(List<OrderDetail> detailList);

    //通过订单编号删除关联的订单明细
    int deleteByOrderId(Integer orderId);

    //通过订单编号查询订单明细
    //select * from t_orderdetail where orderId
    List<OrderDetail> getByOrderId(Integer orderId);

}